package org.raymond.iworks.repository.entity;

import jakarta.persistence.*;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.hibernate.annotations.GenericGenerator;

import java.util.Date;

@Data
@Builder
@EqualsAndHashCode(onlyExplicitlyIncluded=true, callSuper = false)
@Accessors(chain = true)
@Entity
@Table(name="t_sys_log")
public class TSysLog extends AbstractEntity {
    @EqualsAndHashCode.Include
    @Id
    @GenericGenerator(name = ID_GENERATOR_NAME, strategy = ID_GENERATOR)
    @GeneratedValue(generator = ID_GENERATOR_NAME)
    private Long id;

    @Column(name="request_ip")
    private String requestIP;

    @Column(name="request_uri")
    private String requestURI;

    @Column(name="method")
    private String method;

    @Column(name="headers")
    private String headers;

    @Column(name="client_time")
    private Date clientTime;

    @Column(name="params")
    private String params;

    @Column(name="request")
    private String request;

    @Column(name="response")
    private String response;

    @Column(name="state")
    private String state;

    @Column(name="start_time")
    private Date startTime;

    @Column(name="end_time")
    private Date endTime;
}
